write_shared_A(3, ((t1 + 3) % 4) + 1, ((t2 + 31) % 32) + 1);
if (t2 >= 1 && t2 <= 2 && t1 % 3 == 0)
  write_shared_A(3, (-t1 / 3) + 4, t2 + 32);
if (((t1 + 3) % 4) + 1 >= t2 || t2 >= ((t1 + 3) % 4) + ((t2 + 1) % 2) + 2)
  write_shared_A(3, ((t1 + 3) % 4) + 5, -((((t1 + 3) % 4) - t2 + 33) % 32) + t1 + 4 * ((-t1 + 4) / 4) + 32);
if (t1 >= 1 && t2 >= t1 + 1 && t2 <= 4)
  write_shared_A(3, t1 + 4, t2 + 32);
write_shared_A(4, ((t1 + 3) % 4) + 1, ((t2 + 31) % 32) + 1);
if (t2 >= 1 && t2 <= 2 && t1 % 3 == 0)
  write_shared_A(4, (-t1 / 3) + 4, t2 + 32);
if (((t1 + 3) % 4) + 1 >= t2 || t2 >= ((t1 + 3) % 4) + ((t2 + 1) % 2) + 2)
  write_shared_A(4, ((t1 + 3) % 4) + 5, -((((t1 + 3) % 4) - t2 + 33) % 32) + t1 + 4 * ((-t1 + 4) / 4) + 32);
if (t1 >= 1 && t2 >= t1 + 1 && t2 <= 4)
  write_shared_A(4, t1 + 4, t2 + 32);
